import express from 'express';
import {
    getAllTravels,
    approveTravel,
    rejectTravel,
    deleteTravel,
    getDashboardStats,
    registerUser,
    loginUser,
    getUserById
} from '../controllers/adminController.js';

const router = express.Router();

// 仪表盘统计接口
router.get('/dashboard', getDashboardStats);

// 用户相关路由
router.post('/register', registerUser);
router.post('/login', loginUser);
router.get('/users/:id', getUserById);

// 游记管理相关路由
router.get('/travels', getAllTravels);
router.put('/travels/:id/approve', approveTravel);
router.put('/travels/:id/reject', rejectTravel);
router.delete('/travels/:id', deleteTravel);

export default router; 